home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ New Folder Command.xpl < prev    next >
Text File  |  2001-06-18  |  3KB  |  87 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="1"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Files&Folders\Folders Context Menu"
  5. "UIPATH 2"="Appearance\Files&Folders\Drives"
  6. "NAME"="New Folder Context Menu"
  7. "VERSION"="1.04"
  8. "-OSVERSION"="11111"
  9. "LANGUAGE"="VBScript"
  10. "TEXT 1"="Name"
  11. "-DATA 1"="  "
  12. "-DATA 2"="Commands (*.com)|*.com"
  13. "DESCRIPTION 1"="This plug-in will place a new entry in the context menu [right-click] of Folders, Shortcuts to Folders, Drives & some system (e.g. My Computer, Recycle Bin, Control Panel) icons. 
  14. "DESCRIPTION 2"="Activating this new entry will create a new folder, with the name "NewFolder", below the selected item.
  15. "DESCRIPTION 3"="Please supply the name of this new entry as it should appear in the context menu. For example, if you enter "Create Subdir", this text will appear in the context menu."
  16. "DESCRIPTION 4"="To remove the New Folder function, clear the field and apply your changes." 
  17. "AUTHOR"="Ojatex@aol.com"
  18. "CONTACTURL"="http://members.aol.com/ojatex/"
  19. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  20.  
  21.  
  22.  sPathBase1="HKCR\folder\shell\XQNewFolderCommand"
  23.  sPathBase2="HKCR\folder\shell\XQNewFolderCommand\Command"
  24.  
  25.  sPathName="HKCR\folder\shell\XQNewFolderCommand\@"
  26.   sPathCMD="HKCR\folder\shell\XQNewFolderCommand\Command\@"
  27. sPathFlags="HKCR\folder\shell\XQNewFolderCommand\EditFlags"
  28.  
  29.  
  30. sCMD_W9x="command.com /c MD ""%1\NewFolder"""
  31. sCMD_W2K="cmd.exe /c MD ""%1\NewFolder"""
  32.  
  33.  
  34. SUB Plugin_Initialize
  35.  s=RegReadValue(sPathName) 
  36.  SetUIElement 1,s
  37.  
  38. END SUB
  39.  
  40. SUB Plugin_CheckData(ElementIndex)
  41. END SUB
  42.  
  43. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  44.  sName=GetUIElement(1)
  45.  
  46.  if len(sName)>0 then
  47.  
  48.     'ACtivate it!
  49.     sCMD=""
  50.     if GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then 'W9x
  51.        sCMD=sCMD_W9x
  52.     else
  53.        sCMD=SCMD_W2K
  54.     end if
  55.  
  56.     Call RegWriteValue(sPathName,sName,1)
  57.     Call RegWriteValue(sPathCMD,sCMD,1)
  58.     Call RegWriteValue(sPathFlags,"01000000",3)
  59.  
  60.  else
  61.  
  62.     'deactivate it
  63.     s=RegReadValue(sPathName)
  64.     if len(s)>0 then Call RegWriteValue(sPathName,"",1)
  65.  
  66.     s=RegReadValue(sPathCMD)
  67.     if len(s)>0 then Call RegWriteValue(sPathCMD,"",1)
  68.  
  69.     if RegValueExists(sPathFlags)=true then
  70.        RegDeleteValue(sPathFlags)
  71.     end if
  72.  
  73.     If RegPathExists(sPathBase2)=true then
  74.        RegDeletePath(sPathBase2)
  75.     end if
  76.  
  77.     If RegPathExists(sPathBase1)=true then
  78.        RegDeletePath(sPathBase1)
  79.     end if
  80.  
  81.  end if
  82. END SUB
  83.  
  84. SUB Plugin_Terminate
  85. END SUB
  86.  
  87.